<template>
    <div>
        <div class="content">
            <div
            class="item"
            v-for="item of list"
            :key="item.id"
            >
                <router-link :to="'/detail/' + item.id">
                    <img class="img" :src="item.img">
                    <div class="text-info">
                        <div class="left">
                            <div class="title">{{item.title}}</div>
                            <p class=text>{{item.text}}</p>
                        </div>
                        <div class="right">
                            <span class="before">￥</span>
                            <em class="price">{{item.price}}</em>
                            <span class="after">起</span>
                        </div>
                    </div>
                </router-link>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'WeekendContent',
    props: {
        list: [Array, Object]
    }
}
</script>

<style lang="stylus" scoped>
    .content
        background-color #e4e4ea
        padding-top .86rem
        .item
            position relative
            width 100%
            height 4.8rem
            .img
                width 100%
            .text-info
                background-color #fff
                height 1.4rem
                line-height .3rem
                .left
                    width 80%
                    float left
                    .title
                        color #000
                        font-size .32rem
                        padding .3rem 0 0 .2rem
                    .text
                        color #666
                        font-size .26rem
                        padding .2rem 0 0 .2rem
                .right
                    width 20%
                    float right
                    padding-top .5rem
                    color #888
                    font-size 0
                    .before
                        font-size .2rem
                        color #ff8300
                    .price
                        color #ff8300
                        font-size .48rem
                        margin-left 0
                    .after
                        font-size .2rem
</style>
